<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set behaviour flags</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="arrayiterator.serialize.html">« ArrayIterator::serialize</a></li>
      <li style="float: right;"><a href="arrayiterator.uasort.html">ArrayIterator::uasort »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.arrayiterator.html">ArrayIterator</a></li>
    <li>Set behaviour flags</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="arrayiterator.setflags" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ArrayIterator::setFlags</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ArrayIterator::setFlags</span> &mdash; <span class="dc-title">Set behaviour flags</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-arrayiterator.setflags-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ArrayIterator::setFlags</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>): <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   Set the flags that change the behavior of the ArrayIterator.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-arrayiterator.setflags-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">flags</code></dt>

     <dd>

      <p class="para">
       The new ArrayIterator behavior.
       It takes on either a bitmask, or named constants. Using named
       constants is strongly encouraged to ensure compatibility for future
       versions.
      </p>
      <p class="para">
       The available behavior flags are listed below. The actual
       meanings of these flags are described in the
       <a href="class.arrayiterator.html#arrayiterator.constants" class="link">predefined constants</a>.
       <table class="doctable table">
        <caption><strong>ArrayIterator behavior flags</strong></caption>
        
         <thead>
          <tr>
           <th>value</th>
           <th>constant</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td>1</td>
           <td>
            <a href="class.arrayiterator.html#arrayiterator.constants.std-prop-list" class="link">ArrayIterator::STD_PROP_LIST</a>
           </td>
          </tr>

          <tr>
           <td>2</td>
           <td>
            <a href="class.arrayiterator.html#arrayiterator.constants.array-as-props" class="link">ArrayIterator::ARRAY_AS_PROPS</a>
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-arrayiterator.setflags-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-arrayiterator.setflags-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="arrayiterator.getflags.html" class="methodname" rel="rdfs-seeAlso">ArrayIterator::getFlags()</a> - Get behavior flags</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>